<?php
    // Crea el menu de Familias de Productos para la agencia
    $Familias = MenuFamilias( 0 );

	if(!isset($_SESSION['filtro']['familia']['url'])){
		$_SESSION['filtro']['familia']['url'] = '';
	}

	if(!isset($ruta[0])){
		$ruta[0] = '';
	}
	
	
?>



<ul class="nav nav-list bs-docs-sidenav hidden-phone " style='margin-bottom:10px;'>
    <?php foreach($Familias as $clave=>$valor){ ?>
        <?php if (!empty($valor['child'])){ ?>
            <li class="nav-header"><?php echo $valor['nombre'];?></li>
               <?php foreach($valor['child'] as $clave2=>$valor2){ ?>
			   <?php $activo= iif($valor2['href']==$_SESSION['filtro']['familia']['url'],'active','');?>
				<li class='<?php echo $activo;?>'>
                    <a href='<?php echo $valor2['href'];?>' style='z-index:0;' title='<?php echo $valor2['nombre'];?>'>
						<img src='<?php echo $valor2['thumbs1'];?>' alt='<?php echo $valor2['nombre'];?>'
						style='height:16px; width:16px; margin-right:2px;margin-left:20px;' >
                        <?php echo $valor2['nombre'];?> <i style='font-size:10px;font-family:"Courier New";'>(<?php echo $valor2['cuantos'];?>)</i>
                    </a>
				</li>
                <?php } // end foreach $Familias ?>
        <?php } else {?>
			<?php $activo= iif($valor['href']==URL.'/'.$ruta[0],'active','');?>
			<li class='<?php echo $activo;?>'>
				<a href='<?php echo $valor['href'];?>' style='z-index:0;' title='<?php echo $valor['nombre'];?>'>
				<img src='<?php echo $valor['thumbs1'];?>' alt='<?php echo $valor['nombre'];?>' style='height:16px; width:16px; margin-right:2px;' >
				<?php echo $valor['nombre'];?> <i style='font-size:10px;font-family:"Courier New";'>(<?php echo $valor['cuantos'];?>)</i>
				
				</a>
			</li>

        <?php } ?>

    <?php } // end foreach $Familias ?>
</ul>



<div class="btn-group hidden-desktop hidden-tablet" style='width:100%;'>
  <button class="btn">Categoría de Alojamiento</button>
  <button class="btn dropdown-toggle" data-toggle="dropdown">
    <span class="caret"></span>
  </button>
  <ul class="dropdown-menu">
    <?php foreach($Familias as $clave=>$valor){ ?>
        <?php if (!empty($valor['child'])){ ?>
            <li class="nav-header"><?php echo $valor['nombre'];?></li>
               <?php foreach($valor['child'] as $clave2=>$valor2){ ?>
			   <?php $activo= iif($valor2['href']==URL.'/'.$ruta[0],'active','');?>
				<li class='<?php echo $activo;?>'>
                    <a href='<?php echo $valor2['href'];?>' style='z-index:0;' title='<?php echo $valor2['nombre'];?>'>
						<img src='<?php echo $valor2['thumbs1'];?>' alt='<?php echo $valor2['nombre'];?>' style='height:16px; width:16px; margin-right:2px;margin-left:20px;' >
                        <?php echo $valor2['nombre'];?>
                    </a>
				</li>
                <?php } // end foreach $Familias ?>
        <?php } else {?>
			<?php $activo= iif($valor['href']==URL.'/'.$ruta[0],'active','');?>
			<li class='<?php echo $activo;?>'>
				<a href='<?php echo $valor['href'];?>' style='z-index:0;' title='<?php echo $valor['nombre'];?>'>
				<img src='<?php echo $valor['thumbs1'];?>' alt='<?php echo $valor['nombre'];?>' style='height:16px; width:16px; margin-right:2px;' >
				<?php echo $valor['nombre'];?></a></li>

        <?php } ?>

    <?php } // end foreach $Familias ?>
    
  </ul>
</div>

<div class='clearfix'></div>


<?php /* <iframe src='http://www.CongresosyJornadas.net/api/proximos_mini.php' style='width:220px;height:320px;overflow:hidden;' scrolling='no'></iframe> */?>

